home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-02-07 | 1.3 KB | 61 lines | [TEXT/MPS ] |
- (*
- CTBResetTerminal -- Reset the terminal emulator.
-
- To compile and link this file using Macintosh Programmer's Workshop,
-
- pascal -w CTBResetTerminal.p
- link -m ENTRYPOINT -o HyperCommands -rt XCMD=2760 -sn Main=CTBResetTerminal ∂
- CTBResetTerminal.p.o "{MPW}"Libraries:interface.o "{MPW}"Libraries:Libraries:HyperXLib.o
-
- © Copyright 1990 by Apple Computer, Inc.
-
- Initial coding 2/90 by Harry R. Chesley.
- *)
-
- {$R-}
-
- {$S CTBResetTerminal } { Segment name must be the same as the command name. }
-
- unit DummyUnit;
-
- interface
-
- uses MemTypes, QuickDraw, OSIntf, ToolIntf, CTBUtils, FTIntf, CMIntf, TMIntf, CRMIntf, HyperXCmd;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- implementation
-
- procedure CTBResetTerminal(paramPtr: XCmdPtr); forward;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- begin
- CTBResetTerminal(paramPtr);
- end;
-
- procedure CTBResetTerminal(paramPtr: XCmdPtr);
-
- {$I CTBUtil.inc}
-
- procedure Fail(errMsg: Str255); { set theResult and quit }
- begin
- paramPtr^.returnValue := PasToZero(paramPtr,errMsg);
- exit(CTBResetTerminal);
- end;
-
- begin
- { Check the parameter count. }
- if paramPtr^.paramCount > 0 then Fail('Invalid parameter count');
-
- { Make sure the Comm Toolbox is ready. }
- CTBReady;
- { And we have a terminal tool. }
- EnsurePresent(terminalTool);
-
- { Reset the tool. }
- TMReset(Globals^^.termHand);
- end;
-
- end.
-